﻿#region Copyright & License
//
// Project: Quark Framework
// Project site: http://quark.codeplex.com
// See the copyright statement on the project site for more details.
//
// Licensed to the Apache Software Foundation (ASF) under one or more 
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership. 
// The ASF licenses this file to you under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with 
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Quark.Framework.Exceptions;

namespace Quark.Framework.Container
{
    /// <summary>
    /// 组件实例集合基类
    /// </summary>
    public class ComponentInstanceCollectionBase : IComponentInstanceCollection
    {
        #region Members
        #endregion

        #region Constructors
        #endregion

        #region IComponentInstanceCollection 成员

        /// <summary>
        /// 获取当前组件实例集合针对的组件实现类型
        /// </summary>
        /// <seealso cref="IComponentInstanceCollection.ComponentImplementationType"/>
        public Type ComponentImplementationType
        {
            get { return null; }
        }

        /// <summary>
        /// 获取当前实例集合包含的所有组件实例
        /// </summary>
        /// <seealso cref="IComponentInstanceCollection.AllComponentInstances"/>
        public IEnumerator<IQuarkComponent> AllComponentInstances
        {
            get { return null; }
        }

        /// <summary>
        /// 创建一个新的组件实例并加入到当前组件实例集合中，
        /// 在返回该实例之前，新组件实例已经过初始化、置入上下文等初始化过程
        /// </summary>
        /// <seealso cref="IComponentInstanceCollection.CreateNewComponentInstance()"/>
        public IQuarkComponent CreateNewComponentInstance()
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 删除当前集合中的所有组件实例
        /// </summary>
        /// <seealso cref="IComponentInstanceCollection.ClearComponentInstances()"/>
        public void ClearComponentInstances()
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IInitializable 成员

        /// <summary>
        /// 初始化当前实例
        /// </summary>
        /// <seealso cref="IInitializable.InitializeInstance()"/>
        public void InitializeInstance()
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IContextualizable<IComponentInstanceCollectionContext> 成员

        /// <summary>
        /// 当前对象实例置入上下文环境
        /// </summary>
        /// <seealso cref="IContextualizable{T}.Contextualize(T)"/>
        public void Contextualize(IComponentInstanceCollectionContext context)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IContextualizable 成员

        /// <summary>
        /// 当前对象实例置入上下文环境
        /// </summary>
        /// <seealso cref="IContextualizable.Contextualize(IQuarkContext)"/>
        public void Contextualize(IQuarkContext context)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IConfigurable 成员

        /// <summary>
        /// 配置当前对象实例
        /// </summary>
        /// <seealso cref="IConfigurable.Configure(IConfiguration)"/>
        public void Configure(IConfiguration configuration)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IParameterizable 成员

        /// <summary>
        /// 对当前对象实例进行参数化
        /// </summary>
        /// <seealso cref="IParameterizable.Parameterize(IDictionary{string,object})"/>
        public void Parameterize(IDictionary<string, object> parameters)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IDisposable 成员

        /// <summary>
        /// 执行与释放或重置非托管资源相关的应用程序定义的任务
        /// </summary>
        /// <seealso cref="IDisposable.Dispose()"/>
        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize(this);
        }

        /// <summary/>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
            }
        }

        #endregion
    }
}
